using UnityEngine;

public class Altar : Npc
{
    [Header("coll")]
    public GameObject collObj;
    private void Start()
    {
        collObj = transform.Find("CheckPosOne").gameObject;

        //隐藏
        collObj.GetComponent<Collider2D>().enabled = false;
    }
    private void OnMouseDown()
    {
        if (GameManager.Instance.canOprate==false) return;

        SceneItemManager.instance.clickEnemyRight = true;
        collObj.GetComponent<Collider2D>().enabled = true;
        SceneItemManager.instance.SetClickEnemy(gameObject);
    }
    //打开UI
    public void OpenLove()
    {
        //打开提示是否献祭面板
        PanelManager.Open<AltarTip>();
        //关闭碰撞enable
        collObj.GetComponent<Collider2D>().enabled = false;
    }
}
